package butines.game.steering;

import java.util.List;

import butines.core.math2d.Vector2D;


public interface ProximityDatabase<T> {

	public interface Token<T> {

		// the client object calls this each time its position changes
		void notifyNewPosition(Vector2D newPosition);

		// find all neighbors within the given cicle (as center and radius)
		void findNeighbors(Vector2D center, float radius, List<T> results);
		
		// release token resources
		void release();
		
	}
	
	// allocate a token to represent a given client object in this database
	Token<T> allocateToken(T t);

	// returns the number of tokens in the proximity database
	int count();
	 
}
